package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.common.constant.KeyConsts;
import com.iwhalecloud.bss.kite.cucc.common.constant.LocalKeyConsts;
import com.iwhalecloud.bss.kite.manager.api.IQuerySceneInstService;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.manager.inst.KiteSceneInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;
import org.springframework.beans.factory.annotation.Autowired;

public class MVProvincesSpeedCEAttrHandler extends AbstractAttrHandler<KiteInst, AttrData> {

    @Autowired
    IQuerySceneInstService querySceneInstService;

    @Override
    public void after(KiteAttr attr, KiteInst inst, AttrData data) {
        super.after(attr, inst, data);
        // 河北省MV产品,接入带宽不展示
        KiteSceneInst sceneInst = querySceneInstService.getSceneInst(data.getSceneInstId());
        String provinceCode = sceneInst.getProvinceNbr();
        if (LocalKeyConsts.PROVINCE_HEBEI.equals(provinceCode)){
            attr.setShowType(KeyConsts.PROD_ATTR_SHOW_TYPE_H);
        }
    }
}
